

function addSensorbitCod(Blockly) {




    //土壤湿度传感器模块
  Blockly.Python.microbit_soil = function(block) {
    var dropdown_soil = this.getFieldValue('soil');
    Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
    Blockly.Python.definitions_['import_Soilmoisture'] = 'from sensor import soilmoisture';
    var code = "soilmoisture.get_value("+ dropdown_soil +")";
    return [code];
  }
    return Blockly;
}

module.exports = addSensorbitCod;

